package com.zeng.ssm.dal.mapper;

import com.zeng.ssm.dal.model.DistributedLock;

import java.util.List;

/**
 * 数据库分布式锁
 *
 * @author zengwanlin
 * @date 2023-08-29T14:20
 */
public interface DistributedLockDao {

    /**
     * 根据holder查询锁数据
     *
     * @param holder
     * @return
     */
    List<DistributedLock> selectByHolder(String holder);

    /**
     * 插入记录
     *
     * @param record
     * @return
     */
    int insertSelective(DistributedLock record);

    /**
     * 删除记录
     *
     * @param example
     * @return
     */
    int deleteByExample(DistributedLock example);

}
